package com.hc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hc.domain.BlogCategory;
import com.hc.mapper.BlogCategoryMapper;
import com.hc.service.BlogCategoryService;
import com.hc.vo.BlogCategoryVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 博客类别
 *
 * @author 梁云亮
 */
@Service
public class BlogCategoryServiceImpl extends ServiceImpl<BlogCategoryMapper, BlogCategory> implements BlogCategoryService {
    @Resource
    private BlogCategoryMapper blogCategoryMapper;

    @Override
    public int batchCreateBlogCategory(List<BlogCategoryVO> BlogCategoryVOList) {
        int res = blogCategoryMapper.batchInsertBlogCategory(BlogCategoryVOList);
        return res;
    }

    @Override
    public int deleteBlogCategoryById(Integer id) {
        int res = blogCategoryMapper.deleteBlogCategoryById(id);
        return res;
    }

    @Override
    public int batchDeleteBlogCategory(List<Integer> blogIds) {
        int res = blogCategoryMapper.batchDeleteBlogCategoryById(blogIds);
        return res;
    }
}

